/*
 * p2007.cpp
 *
 *  Created on: 2013-3-17
 *      Author: zy
 */

#include<cstdio>
#include<cmath>
#include<algorithm>

using namespace std;
#define push(x) ch[len ++]=x
#define pop() len--
const double EPS = 1e-8;
int sig(double d)
{
	return fabs(d)<EPS ? 0 : d < 0 ? -1 : 1;
}
struct Point {
	double x,y;
	bool operator < (const Point &p) const {
			return sig(x-p.x) != 0 ? x < p.x : sig(y-p.y) < 0;
		}
};



double cross(Point o,Point a, Point b){
	return (a.x-o.x)*(b.y-o.y)-(b.x-o.x)*(a.y-o.y);
}

int graham(Point *p, int n, int *ch)
{
	sort(p,p+n);
	int len=0,len0=1,i;
	for(i=0;i<n;i++)
	{
		while(len>len0&&sig(cross(p[ch[len-1]],p[ch[len-2]],p[i]))<=0)
			pop();
		push(i);
	}
	len0=len;
	for(i = n-2;i>=0;i--)
	{
		while(len>len0 && sig(cross(p[ch[len-1]],p[ch[len-2]],p[i]))<=0)
			pop();
		push(i);
	}
	return len-1;
}
int main()
{
	int n=0,L,c[110];
	Point p[101];
	while(scanf("%lf%lf",&p[n].x,&p[n].y)!=EOF)n++;
	n=graham(p,n,c);
	double t=0;
	for(int i=0;i<n;i++)
		if(sig(p[c[i]].x) ==0 && sig(p[c[i]].y)==0){t=i;break;}
	for(int i=t;i>=0;i--)printf("(%d,%d)\n",(int)p[c[i]].x,(int)p[c[i]].y);
	for(int i=n-1;i>=t+1;i--)printf("(%d,%d)\n",(int)p[c[i]].x,(int)p[c[i]].y);
	return 0;

}
